<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width" />
		<title>LLM Link - Universal LLM Proxy Service</title>
		<meta name="description" content="A universal LLM proxy service providing zero-configuration access to 10 major providers through multiple API formats, with built-in optimizations for AI coding tools." />
		
		<link href="./_app/immutable/assets/0.1cfaa3d8.css" rel="stylesheet">
		<link rel="modulepreload" href="./_app/immutable/entry/start.4c45d66d.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/scheduler.5d594c60.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/singletons.fe8a2c51.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/paths.a1e3c374.js">
		<link rel="modulepreload" href="./_app/immutable/entry/app.624c4e39.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/index.1d3f9147.js">
		<link rel="modulepreload" href="./_app/immutable/nodes/0.b7921cbc.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/stores.e8a1545b.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/github.eb49a4d0.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/external-link.112d13ed.js">
		<link rel="modulepreload" href="./_app/immutable/nodes/4.17655a69.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/check.5c7eac0f.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/zap.ac426999.js">
		<link rel="modulepreload" href="./_app/immutable/chunks/terminal.de9394d9.js">
	</head>
	<body data-sveltekit-preload-data="hover">
		<div style="display: contents">  <div class="min-h-screen bg-background font-sans antialiased"><div class="relative flex min-h-screen flex-col"><header class="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60"><div class="container flex h-14 items-center"><div class="mr-4 hidden md:flex"><a href="/llm-link/" class="mr-6 flex items-center space-x-2"><span class="hidden font-bold sm:inline-block text-xl" data-svelte-h="svelte-1b8f07s">LLM Link</span></a> <nav class="flex items-center space-x-6 text-sm font-medium"><a href="/llm-link/" class="transition-colors hover:text-foreground/80 text-foreground/60">Home</a> <a href="/llm-link/docs" class="transition-colors hover:text-foreground/80 text-foreground/60">Documentation</a> <a href="/llm-link/api" class="transition-colors hover:text-foreground/80 text-foreground/60">API Reference</a> <a href="/llm-link/providers" class="transition-colors hover:text-foreground/80 text-foreground/60">Providers</a></nav></div> <div class="flex flex-1 items-center justify-between space-x-2 md:justify-end"><div class="w-full flex-1 md:w-auto md:flex-none"><button type="button"  class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-github mr-2 h-4 w-4"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"></path><path d="M9 18c-4.51 2-5-2-7-2"></path></svg>
					GitHub</button> <button type="button"  class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-external-link mr-2 h-4 w-4"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" x2="21" y1="14" y2="3"></line></svg>
					Get Started</button></div></div></div></header> <main class="flex-1"><div class="container py-8"><div class="max-w-6xl mx-auto"><div class="mb-8" data-svelte-h="svelte-7jaur9"><h1 class="text-4xl font-bold tracking-tight mb-4">Documentation</h1> <p class="text-lg text-muted-foreground">Complete guide to setting up and using LLM Link with 10 major LLM providers. 
				Universal proxy service with hot-reload configuration and multiple API format support.</p></div>  <section class="mb-12"><div class="rounded-lg border bg-card p-6"><div class="flex items-center mb-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-package h-6 w-6 mr-2 text-primary"><path d="m7.5 4.27 9 5.15"></path><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"></path><path d="m3.3 7 8.7 5 8.7-5"></path><path d="M12 22V12"></path></svg> <h2 class="text-2xl font-semibold" data-svelte-h="svelte-1x5cl2e">Installation</h2></div> <div class="grid gap-6 md:grid-cols-2"><div><h3 class="text-lg font-medium mb-3 flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-check h-4 w-4 mr-2 text-green-600"><path d="M20 6 9 17l-5-5"></path></svg>
							Option 1: Install from crates.io (Recommended)</h3> <div class="bg-muted rounded-md p-4" data-svelte-h="svelte-gz56n"><code class="text-sm font-mono">cargo install llm-link</code></div> <p class="text-sm text-muted-foreground mt-2" data-svelte-h="svelte-9m6453">Installs the latest stable version from Rust package registry</p></div> <div><h3 class="text-lg font-medium mb-3 flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-code h-4 w-4 mr-2 text-blue-600"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>
							Option 2: Build from source</h3> <div class="bg-muted rounded-md p-4" data-svelte-h="svelte-10c086x"><code class="text-sm font-mono">git clone https://github.com/lipish/llm-link.git<br>cd llm-link<br>cargo build --release</code></div> <p class="text-sm text-muted-foreground mt-2" data-svelte-h="svelte-mdyt2e">Get the latest features from the main branch</p></div></div></div></section>  <section class="mb-12"><div class="rounded-lg border bg-card p-6"><div class="flex items-center mb-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-terminal h-6 w-6 mr-2 text-primary"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" x2="20" y1="19" y2="19"></line></svg> <h2 class="text-2xl font-semibold" data-svelte-h="svelte-ldtush">Quick Start</h2></div> <div class="space-y-6"><div data-svelte-h="svelte-11x92ry"><h3 class="text-lg font-medium mb-3">Start with Application Presets</h3> <p class="text-sm text-muted-foreground mb-3">Optimized configurations for popular AI coding tools:</p> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono"># For Codex CLI (GitHub Copilot CLI)<br>
llm-link --app codex-cli<br><br>
# For Zed editor<br>
llm-link --app zed<br><br>
# For Claude Code<br>
llm-link --app claude-code<br><br>
# For Continue.dev<br>
llm-link --app continue</code></div></div> <div data-svelte-h="svelte-kwmvgl"><h3 class="text-lg font-medium mb-3">Start with Specific Protocols</h3> <p class="text-sm text-muted-foreground mb-3">Choose which API protocols to enable:</p> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono"># Enable specific protocols<br>
llm-link --protocols openai,anthropic,ollama<br><br>
# Enable all protocols<br>
llm-link --protocols all<br><br>
# Start on custom port<br>
llm-link --port 8088 --protocols openai,anthropic</code></div></div> <div><h3 class="text-lg font-medium mb-3" data-svelte-h="svelte-abr04u">Optional API Key Startup</h3> <div class="bg-yellow-50 border border-yellow-200 rounded-md p-4"><div class="flex items-start"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-alert-circle h-4 w-4 mr-2 text-yellow-600 mt-0.5"><circle cx="12" cy="12" r="10"></circle><line x1="12" x2="12" y1="8" y2="12"></line><line x1="12" x2="12.01" y1="16" y2="16"></line></svg> <div data-svelte-h="svelte-10789z1"><p class="text-sm text-yellow-800"><strong>New in v0.3.3:</strong> LLM Link can now start without API keys!</p> <p class="text-sm text-yellow-700 mt-1">Service starts normally and displays warnings for missing keys. 
										Configure API keys later using hot-reload API.</p></div></div></div></div></div></div></section>  <section class="mb-12"><div class="rounded-lg border bg-card p-6"><div class="flex items-center mb-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-settings h-6 w-6 mr-2 text-primary"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg> <h2 class="text-2xl font-semibold" data-svelte-h="svelte-1kawov">Provider Configuration</h2></div> <div class="mb-6"><h3 class="text-lg font-medium mb-3" data-svelte-h="svelte-1c2u4k2">Environment Variables</h3> <p class="text-sm text-muted-foreground mb-4" data-svelte-h="svelte-13la46v">Set API keys as environment variables. For Ollama, no API key is required.</p> <div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3"><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">OpenAI</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">OPENAI_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">Leading AI models including GPT-4, GPT-3.5, and more</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Function Calling </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Vision </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Anthropic</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">ANTHROPIC_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">Advanced Claude models with strong reasoning capabilities</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Long Context </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Vision </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Zhipu AI</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">ZHIPU_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">Chinese AI models with multilingual support</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Multilingual </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Code Generation </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Aliyun</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">ALIYUN_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">Alibaba Cloud's powerful Qwen models</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Long Context </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Multilingual </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Volcengine</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">VOLCENGINE_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">ByteDance's advanced Doubao models</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Cost Effective </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Fast Response </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Tencent</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">TENCENT_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">Tencent's Hunyuan models for various applications</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Chinese Optimized </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Enterprise Ready </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Longcat</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">LONGCAT_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">High-performance models for general dialogue</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Fast Response </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Cost Effective </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Moonshot</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">MOONSHOT_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">Kimi models with large context windows</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">200K Context </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Document Processing </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Minimax</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">MINIMAX_API_KEY</code></div> <p class="text-xs text-muted-foreground mb-2">Powerful AI models with OpenAI-compatible API</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Streaming </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Multilingual </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Fast Response </span></div> </div><div class="border rounded-lg p-4"><div class="flex items-center mb-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-key h-4 w-4 mr-2 text-primary"><circle cx="7.5" cy="15.5" r="5.5"></circle><path d="m21 2-9.6 9.6"></path><path d="m15.5 7.5 3 3L22 7l-3-3"></path></svg> <h4 class="font-medium">Ollama</h4></div> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">None Required</code></div> <p class="text-xs text-muted-foreground mb-2">Local and open-source models</p> <div class="flex flex-wrap gap-1"><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Local Deployment </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Privacy </span><span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded">Custom Models </span></div> </div></div></div> <div data-svelte-h="svelte-1nn7nit"><h3 class="text-lg font-medium mb-3">Configuration File (Optional)</h3> <p class="text-sm text-muted-foreground mb-3">Create a <code>keys.yaml</code> file in the project directory:</p> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono">providers:<br>
 openai:<br>
  api_key: &quot;your_openai_key&quot;<br>
 anthropic:<br>
  api_key: &quot;your_anthropic_key&quot;<br>
 zhipu:<br>
  api_key: &quot;your_zhipu_key&quot;<br>
 # ... other providers</code></div></div></div></section>  <section class="mb-12"><div class="rounded-lg border bg-card p-6"><div class="flex items-center mb-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-zap h-6 w-6 mr-2 text-primary"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg> <h2 class="text-2xl font-semibold" data-svelte-h="svelte-12rx1o8">Hot Reload Configuration</h2></div> <div class="space-y-6"><div><h3 class="text-lg font-medium mb-3" data-svelte-h="svelte-rxjhwk">Dynamic Configuration Update</h3> <p class="text-sm text-muted-foreground mb-3" data-svelte-h="svelte-8dokgn">Update provider configurations without restarting the service using the REST API:</p> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono">curl -X POST http://localhost:8088/api/config/update \
  -H "Content-Type: application/json" \
  -d '{"provider": "openai", "api_key": "new_key"}'</code></div></div> <div data-svelte-h="svelte-1pzniip"><h3 class="text-lg font-medium mb-3">Available API Endpoints</h3> <div class="grid gap-4 md:grid-cols-2"><div class="border rounded-lg p-4"><h4 class="font-medium mb-2">Update Configuration</h4> <code class="text-xs font-mono">POST /api/config/update</code> <p class="text-xs text-muted-foreground mt-1">Update provider API keys and settings</p></div> <div class="border rounded-lg p-4"><h4 class="font-medium mb-2">List Models</h4> <code class="text-xs font-mono">GET /api/models</code> <p class="text-xs text-muted-foreground mt-1">Get available models for all providers</p></div> <div class="border rounded-lg p-4"><h4 class="font-medium mb-2">Provider Status</h4> <code class="text-xs font-mono">GET /api/providers</code> <p class="text-xs text-muted-foreground mt-1">Check status of all configured providers</p></div> <div class="border rounded-lg p-4"><h4 class="font-medium mb-2">Health Check</h4> <code class="text-xs font-mono">GET /api/health</code> <p class="text-xs text-muted-foreground mt-1">Service health and version information</p></div></div></div></div></div></section>  <section class="mb-12"><div class="rounded-lg border bg-card p-6"><div class="flex items-center mb-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-globe h-6 w-6 mr-2 text-primary"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg> <h2 class="text-2xl font-semibold" data-svelte-h="svelte-5opwpn">API Protocols</h2></div> <div class="grid gap-6 md:grid-cols-3" data-svelte-h="svelte-rd2bhc"><div class="border rounded-lg p-4"><h3 class="font-medium mb-2">OpenAI API</h3> <p class="text-sm text-muted-foreground mb-3">Compatible with OpenAI&#39;s API format</p> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">Endpoint: /v1</code></div> <p class="text-xs text-muted-foreground">Supports chat completions, streaming, function calling</p></div> <div class="border rounded-lg p-4"><h3 class="font-medium mb-2">Anthropic API</h3> <p class="text-sm text-muted-foreground mb-3">Native Anthropic Claude API</p> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">Endpoint: /v1/messages</code></div> <p class="text-xs text-muted-foreground">Supports messages API, streaming, long context</p></div> <div class="border rounded-lg p-4"><h3 class="font-medium mb-2">Ollama API</h3> <p class="text-sm text-muted-foreground mb-3">Compatible with Ollama&#39;s API format</p> <div class="bg-muted rounded p-2 mb-2"><code class="text-xs font-mono">Endpoint: /api/generate</code></div> <p class="text-xs text-muted-foreground">Supports local models, custom models, streaming</p></div></div></div></section>  <section class="mb-12"><div class="rounded-lg border bg-card p-6"><div class="flex items-center mb-6"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-code h-6 w-6 mr-2 text-primary"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg> <h2 class="text-2xl font-semibold" data-svelte-h="svelte-otsuu6">As a Rust Library</h2></div> <div class="space-y-6"><div data-svelte-h="svelte-1ezjy1f"><h3 class="text-lg font-medium mb-3">Add to Cargo.toml</h3> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono">[dependencies]<br>llm-link = &quot;0.3.5&quot;</code></div></div> <div><h3 class="text-lg font-medium mb-3" data-svelte-h="svelte-1rr7nhu">Usage Examples</h3> <div class="space-y-4"><div><h4 class="font-medium mb-2" data-svelte-h="svelte-9z6udh">List All Providers</h4> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono">use llm_link::provider::ProviderRegistry;

// List all available providers
let providers = ProviderRegistry::list_providers();
println!("Available providers: {:?}", providers)</code></div></div> <div><h4 class="font-medium mb-2" data-svelte-h="svelte-1iz98fs">Get Models for Provider</h4> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono">use llm_link::models::ModelsConfig;

// Load models configuration
let models = ModelsConfig::load_with_fallback()
    .get_models_for_provider("openai");

for model in models {
    println!("Model: {}", model.name);
}</code></div></div> <div><h4 class="font-medium mb-2" data-svelte-h="svelte-1jsu91s">Create LLM Client</h4> <div class="bg-muted rounded-md p-4"><code class="text-sm font-mono">use llm_link::provider::{Provider, ProviderConfig};
use llm_link::provider::openai::OpenAIProvider;

let config = ProviderConfig {
    api_key: "your_key".to_string(),
    base_url: None,
};

let client = OpenAIProvider::create_client(&amp;config)?;
// Use client for chat completions</code></div></div></div></div></div></div></section>  <section class="mb-12" data-svelte-h="svelte-j5rzn6"><div class="rounded-lg border bg-card p-6"><h2 class="text-2xl font-semibold mb-6">Troubleshooting</h2> <div class="space-y-4"><div class="border-l-4 border-yellow-400 pl-4"><h3 class="font-medium mb-2">Service fails to start</h3> <p class="text-sm text-muted-foreground">Check if required ports are available. Use <code>--port</code> to specify a different port.</p></div> <div class="border-l-4 border-blue-400 pl-4"><h3 class="font-medium mb-2">API key not working</h3> <p class="text-sm text-muted-foreground">Verify API key format and permissions. Use hot-reload API to update keys without restart.</p></div> <div class="border-l-4 border-green-400 pl-4"><h3 class="font-medium mb-2">Ollama connection failed</h3> <p class="text-sm text-muted-foreground">Ensure Ollama is running on localhost:11434. Use <code>ollama pull</code> to download models.</p></div></div></div></section>  <div class="mt-12 text-center"><a href="https://github.com/lipish/llm-link" class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-11 rounded-md px-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-github mr-2 h-4 w-4"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"></path><path d="M9 18c-4.51 2-5-2-7-2"></path></svg>
				View on GitHub</a> <a href="/llm-link/api" class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-code mr-2 h-4 w-4"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>
				API Reference</a> <a href="/llm-link/providers" class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-globe mr-2 h-4 w-4"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg>
				View All Providers</a></div></div></div></main> <footer class="border-t bg-background"><div class="container py-8 md:py-12"><div class="grid grid-cols-1 gap-8 md:grid-cols-4"><div class="space-y-3" data-svelte-h="svelte-1pvo26g"><h3 class="text-lg font-semibold">LLM Link</h3> <p class="text-sm text-muted-foreground max-w-xs">Universal LLM proxy service providing zero-configuration access to multiple providers.</p></div> <div class="space-y-3"><h4 class="text-sm font-semibold" data-svelte-h="svelte-kzoimb">Product</h4> <ul class="space-y-2 text-sm"><li><a href="/llm-link/docs" class="text-muted-foreground hover:text-foreground">Documentation</a></li> <li><a href="/llm-link/api" class="text-muted-foreground hover:text-foreground">API Reference</a></li> <li><a href="/llm-link/providers" class="text-muted-foreground hover:text-foreground">Providers</a></li></ul></div> <div class="space-y-3" data-svelte-h="svelte-1m3u7jc"><h4 class="text-sm font-semibold">Resources</h4> <ul class="space-y-2 text-sm"><li><a href="https://github.com/lipish/llm-link" class="text-muted-foreground hover:text-foreground">GitHub</a></li> <li><a href="https://crates.io/crates/llm-link" class="text-muted-foreground hover:text-foreground">Crates.io</a></li> <li><a href="https://docs.rs/llm-link" class="text-muted-foreground hover:text-foreground">API Docs</a></li></ul></div> <div class="space-y-3" data-svelte-h="svelte-ghwtx6"><h4 class="text-sm font-semibold">Community</h4> <ul class="space-y-2 text-sm"><li><a href="https://github.com/lipish/llm-link/issues" class="text-muted-foreground hover:text-foreground">Issues</a></li> <li><a href="https://github.com/lipish/llm-link/discussions" class="text-muted-foreground hover:text-foreground">Discussions</a></li> <li><a href="https://github.com/lipish/llm-link/releases" class="text-muted-foreground hover:text-foreground">Releases</a></li></ul></div></div> <div class="mt-8 border-t pt-8 text-center text-sm text-muted-foreground" data-svelte-h="svelte-1hbra6b"><p>© 2025 LLM Link. Built with Svelte + shadcn/ui.</p></div></div></footer></div> </div> 
			
			<script>
				{
					__sveltekit_38jqc5 = {
						assets: "/llm-link",
						base: new URL(".", location).pathname.slice(0, -1),
						env: {}
					};

					const element = document.currentScript.parentElement;

					const data = [null,null];

					Promise.all([
						import("./_app/immutable/entry/start.4c45d66d.js"),
						import("./_app/immutable/entry/app.624c4e39.js")
					]).then(([kit, app]) => {
						kit.start(app, element, {
							node_ids: [0, 4],
							data,
							form: null,
							error: null
						});
					});
				}
			</script>
		</div>
	</body>
</html>
